package com.yurun.service.impl;

import com.yurun.entity.Classes;
import com.yurun.mapper.ClassesMapper;
import com.yurun.service.ClassesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 宫静雨
 */
@Service
@Transactional(rollbackFor = SQLException.class)
public class ClassesServiceImpl extends ServiceImpl<ClassesMapper, Classes> implements ClassesService {

    @Resource
    private ClassesMapper classesMapper;

    @Override
    public Classes getById(Integer classId) {
        return classesMapper.getById(classId);
    }

    @Override
    public List<Classes> getByIdsOrClassName(List<Integer> classId, String className) {
        return classesMapper.getByIdsOrClassName(classId, className);
    }
}
